/**
 * 
 */
package com.study.dao;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.study.entity.Major;
import com.study.entity.Student;

/**
 * 关联查询
 * @author Administrator
 * @date 2019年5月14日
 */
public interface IMajor {

	//通过注解实现mapper
	@Select("select m_id id, m_name name from major where m_id in (Select m_id from student_major where s_id =#{id})")
	public List<Major> getMajorByStuId(int id);
	

}
